<template>
  <!--selector-->
    <div class="clearfix selector">
        <div class="type-wrap logo">
            <div class="fl key brand">品牌</div>
            <div class="value logos">
                <ul class="logo-list">
                    <li 
                    v-for="trademark in trademarkList" 
                    :key="trademark.tmId"
                    @click="trademarkSearch(trademark)"
                    >
                    {{trademark.tmName}}
                    </li>
                </ul>
            </div>
            <div class="ext">
                <a href="javascript:void(0);" class="sui-btn">多选</a>
                <a href="javascript:void(0);">更多</a>
            </div>
        </div>
        <div class="type-wrap" v-for="attrs in attrsList" :key="attrs.attrId">
            <div class="fl key">{{attrs.attrName}}</div>
            <div class="fl value">
                <ul class="type-list">
                    <li 
                    v-for="(attrValue,index) in attrs.attrValueList" 
                    :key="index"
                    @click="attrValueSearch(attrValue,attrs)"
                    >
                    <a>{{attrValue}}</a>
                    </li>
                </ul>
            </div>
            <div class="fl ext"></div>
        </div>
    </div>
</template>

<script>
import {mapGetters} from 'vuex';
export default {
    name:"",
    computed:{
        ...mapGetters(["attrsList","trademarkList"])
    },
    methods:{
        trademarkSearch(trademark){
            this.$emit("trademarkSearch",trademark);
        },
        attrValueSearch(attrValue,attrs){
            this.$emit("attrValueSearch",attrValue,attrs);
        },
    },
}
</script>

<style>

</style>